<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="tfn" uri="http://www.totoro.com/functions" %>
<html>
<head>
    <title>我的天猫 - 个人资料</title>
    <link rel="shortcut icon" type="image/x-icon" href="/static/img/index/favicon.png">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/public.css"/>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/nav.css"/>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/iconFont/iconfont.css"/>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/user/my_data.css"/>
</head>
<body>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/frame/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/frame/totoro-utils.js"></script>
<jsp:include page="${pageContext.request.contextPath}/public_page/nav.jsp"></jsp:include>
<div style="width: 100%; height: 6px; background-color: #F2F2F2"></div>

<jsp:include page="${pageContext.request.contextPath}/public_page/ui_header.jsp"></jsp:include>

<!-- content-->
<div id="page">
    <div id="content" class="layout grid-s160m0">
        <div id="mytaobao-panel" class="grid-c2">
            <div class="col-main">
                <div class="main-wrap">
                    <div id="profile" class="sns-config">
                        <div class="sns-tab tab-app">
                            <ul>
                                <li class="selected">
                                    <a href="?"><span>个人资料</span></a>
                                </li>
                            </ul>
                            <ul class="tab-sub">
                                <li class="selected"><a href="?"><span>基本资料</span></a></li>
                            </ul>
                        </div>
                        <div class="sns-box box-detail">
                            <div class="bd">
                                <div class="sns-nf">
                                    <div class="tips-box">亲爱的<b>${tfn:cipheretext(user.userName)}</b>，填写真实的资料，有助于好友找到你哦。</div>
                                    <form id="baseInfoForm" name="baseInfoForm" method="post" class="infoForm" enctype="multipart/form-data" action="/user_logic/saveData.htm">
                                        <div id="main-profile" class="parts">
                                            <p>
                                                <label>当前头像：</label>
                                                <span class="pf-avatar-box">
                                <a class="pf-avatar">
                                    <c:if test="${empty user.head}" var="haveHead">
                                        <img src="${user.head}" id="userHead" width="80" height="80">
                                    </c:if>
                                    <c:if test="${!haveHead}">
                                    <img src="${user.head}" id="userHead" width="80" height="80">
                                    </c:if>
                                                                    </a>
                                <a class="pf-edit-avatar" style="display: none;">编辑头像</a>
                                                    <!-- 用户提交图片的input -->
                                                    <input type="file" style="visibility: hidden" id="submitHead" name="file"/>
                                                </span>
                                            </p>
                                            <p>
                                                <label>昵称：<em>*</em></label>
                                                <%-- 将昵称、真实姓名做隐藏--%>
                                                <input id="J_uniqueName-mask" class="f-txt" type="text" value="${tfn:cipheretext(user.userName)}" maxlength="25">
                                                <input id="J_uniqueName" name="userName" type="hidden" value="${user.userName}" maxlength="25">
                                            </p>
                                            <div class="sns-msg" id="nameTip" style="display:none;">
                                                <p class="error">性别为必填项！</p>
                                            </div>
                                            <p class="input-help-text">
                                                <span>*昵称填写须知：与淘宝业务或卖家品牌冲突的昵称，淘宝将有可能收回</span>
                                            </p>
                                            <p>
                                                <label>真实姓名：</label>
                                                <input id="J_realname-mask" class="f-txt" type="text" value="${tfn:cipheretext(user.userName)}" maxlength="6">
                                                <input id="J_realname" type="hidden" value="${user.userName}" maxlength="6">
                                            </p>
                                            <p>
                                                <label>性别：<em>*</em></label>
                                                <label for="J_gender1" class="except">
                                                    <input id="J_gender1" type="radio" name="sex" value="0" ${user.sex == "0" && !empty user.sex?"checked":""}>男</label>
                                                <label for="J_gender2" class="except">
                                                    <input id="J_gender2" type="radio" name="sex" value="1" ${user.sex == "1" && !empty user.sex?"checked":""}>女</label>
                                            </p>
                                            <div class="sns-msg" id="sexTip" style="display:none;">
                                                <p class="error">性别为必填项！</p>
                                            </div>
                                            <p>
                                                <label>居住地：</label>
                                                <select name="_fm.b._0.p" id="J_redstar_province"><option value=""></option></select>
                                                <select name="_fm.b._0.c" id="J_redstar_city"></select>
                                                <select name="_fm.b._0.a" id="J_redstar_area"></select>
                                                <input id="redstar" value="${user.redstar}" type="hidden" name="redstar">
                                                <input id="redstarText" value="${user.redstarText}" type="hidden" name="redstarText">
                                            </p>
                                            <p>
                                                <label>家乡：</label>
                                                <select id="J_live_province" name="_fm.b._0.ho"><option value=""></option></select>
                                                <select id="J_live_city" name="_fm.b._0.hom"></select>
                                                <select id="J_live_area" name="_fm.b._0.home"></select>
                                                <input type="hidden" name="live" value="${user.live}" id="live">
                                                <input id="liveText" value="${user.liveText}" name="liveText" type="hidden">
                                            </p>
                                        </div>
                                        <div class="act skin-blue">
                        <span class="btn n-btn">
                            <button type="submit" id="J_saveProfile">保存</button>
                            <div style="width:1px; height:1px; overflow:hidden; ">
                                <input type="submit">
                            </div>
                        </span>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- left -->
            <jsp:include page="${pageContext.request.contextPath}/public_page/um-left.jsp"></jsp:include>
            <style>
                #myData a{
                    color: #f40;
                }
            </style>
        </div>
    </div>
</div>
<!-- content-->

<jsp:include page="${pageContext.request.contextPath}/public_page/last.html"></jsp:include>
<jsp:include page="/public_page/open_chat.jsp"></jsp:include>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/self/user/myData.js"></script>
</body>
</html>
